3.5.35 \(\int (g+h x)^2 (a+b \log (c (d (e+f x)^p)^q))^3 \, dx\) [435]

Optimal. Leaf size=492 \[ \frac {6 a b^2 (f g-e h)^2 p^2 q^2 x}{f^2}-\frac {6 b^3 (f g-e h)^2 p^3 q^3 x}{f^2}-\frac {3 b^3 h (f g-e h) p^3 q^3 (e+f x)^2}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}+\frac {6 b^3 (f g-e h)^2 p^2 q^2 (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^3}+\frac {3 b^2 h (f g-e h) p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}-\frac {3 b (f g-e h)^2 p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}-\frac {3 b h (f g-e h) p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3} \]

[Out]

6*a*b^2*(-e*h+f*g)^2*p^2*q^2*x/f^2-6*b^3*(-e*h+f*g)^2*p^3*q^3*x/f^2-3/4*b^3*h*(-e*h+f*g)*p^3*q^3*(f*x+e)^2/f^3
-2/27*b^3*h^2*p^3*q^3*(f*x+e)^3/f^3+6*b^3*(-e*h+f*g)^2*p^2*q^2*(f*x+e)*ln(c*(d*(f*x+e)^p)^q)/f^3+3/2*b^2*h*(-e
*h+f*g)*p^2*q^2*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/f^3+2/9*b^2*h^2*p^2*q^2*(f*x+e)^3*(a+b*ln(c*(d*(f*x+e)^p
)^q))/f^3-3*b*(-e*h+f*g)^2*p*q*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/f^3-3/2*b*h*(-e*h+f*g)*p*q*(f*x+e)^2*(a+b
*ln(c*(d*(f*x+e)^p)^q))^2/f^3-1/3*b*h^2*p*q*(f*x+e)^3*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/f^3+(-e*h+f*g)^2*(f*x+e)*(
a+b*ln(c*(d*(f*x+e)^p)^q))^3/f^3+h*(-e*h+f*g)*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3/f^3+1/3*h^2*(f*x+e)^3*(a
+b*ln(c*(d*(f*x+e)^p)^q))^3/f^3

________________________________________________________________________________________

Rubi [A]
time = 0.65, antiderivative size = 492, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 8, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2448, 2436, 2333, 2332, 2437, 2342, 2341, 2495} \begin {gather*} \frac {3 b^2 h p^2 q^2 (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}+\frac {6 a b^2 p^2 q^2 x (f g-e h)^2}{f^2}-\frac {3 b h p q (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {3 b p q (e+f x) (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}+\frac {h (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {(e+f x) (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}+\frac {6 b^3 p^2 q^2 (e+f x) (f g-e h)^2 \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^3}-\frac {3 b^3 h p^3 q^3 (e+f x)^2 (f g-e h)}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}-\frac {6 b^3 p^3 q^3 x (f g-e h)^2}{f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]

[Out]

(6*a*b^2*(f*g - e*h)^2*p^2*q^2*x)/f^2 - (6*b^3*(f*g - e*h)^2*p^3*q^3*x)/f^2 - (3*b^3*h*(f*g - e*h)*p^3*q^3*(e
+ f*x)^2)/(4*f^3) - (2*b^3*h^2*p^3*q^3*(e + f*x)^3)/(27*f^3) + (6*b^3*(f*g - e*h)^2*p^2*q^2*(e + f*x)*Log[c*(d
*(e + f*x)^p)^q])/f^3 + (3*b^2*h*(f*g - e*h)*p^2*q^2*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2*f^3) + (
2*b^2*h^2*p^2*q^2*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(9*f^3) - (3*b*(f*g - e*h)^2*p*q*(e + f*x)*(a
+ b*Log[c*(d*(e + f*x)^p)^q])^2)/f^3 - (3*b*h*(f*g - e*h)*p*q*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/
(2*f^3) - (b*h^2*p*q*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(3*f^3) + ((f*g - e*h)^2*(e + f*x)*(a + b
*Log[c*(d*(e + f*x)^p)^q])^3)/f^3 + (h*(f*g - e*h)*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3)/f^3 + (h^2*
(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^3)/(3*f^3)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2437

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[(f*(x/d))^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2448

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin {align*} \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx &=\text {Subst}\left (\int (g+h x)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3 \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\int \left (\frac {(f g-e h)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3}{f^2}+\frac {2 h (f g-e h) (e+f x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3}{f^2}+\frac {h^2 (e+f x)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3}{f^2}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\frac {h^2 \int (e+f x)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3 \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 h (f g-e h)) \int (e+f x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3 \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h)^2 \int \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^3 \, dx}{f^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\text {Subst}\left (\frac {h^2 \text {Subst}\left (\int x^2 \left (a+b \log \left (c d^q x^{p q}\right )\right )^3 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 h (f g-e h)) \text {Subst}\left (\int x \left (a+b \log \left (c d^q x^{p q}\right )\right )^3 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(f g-e h)^2 \text {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right )^3 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}-\text {Subst}\left (\frac {\left (b h^2 p q\right ) \text {Subst}\left (\int x^2 \left (a+b \log \left (c d^q x^{p q}\right )\right )^2 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {(3 b h (f g-e h) p q) \text {Subst}\left (\int x \left (a+b \log \left (c d^q x^{p q}\right )\right )^2 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {\left (3 b (f g-e h)^2 p q\right ) \text {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right )^2 \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {3 b (f g-e h)^2 p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}-\frac {3 b h (f g-e h) p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}+\text {Subst}\left (\frac {\left (2 b^2 h^2 p^2 q^2\right ) \text {Subst}\left (\int x^2 \left (a+b \log \left (c d^q x^{p q}\right )\right ) \, dx,x,e+f x\right )}{3 f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (3 b^2 h (f g-e h) p^2 q^2\right ) \text {Subst}\left (\int x \left (a+b \log \left (c d^q x^{p q}\right )\right ) \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (6 b^2 (f g-e h)^2 p^2 q^2\right ) \text {Subst}\left (\int \left (a+b \log \left (c d^q x^{p q}\right )\right ) \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {6 a b^2 (f g-e h)^2 p^2 q^2 x}{f^2}-\frac {3 b^3 h (f g-e h) p^3 q^3 (e+f x)^2}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}+\frac {3 b^2 h (f g-e h) p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}-\frac {3 b (f g-e h)^2 p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}-\frac {3 b h (f g-e h) p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}+\text {Subst}\left (\frac {\left (6 b^3 (f g-e h)^2 p^2 q^2\right ) \text {Subst}\left (\int \log \left (c d^q x^{p q}\right ) \, dx,x,e+f x\right )}{f^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {6 a b^2 (f g-e h)^2 p^2 q^2 x}{f^2}-\frac {6 b^3 (f g-e h)^2 p^3 q^3 x}{f^2}-\frac {3 b^3 h (f g-e h) p^3 q^3 (e+f x)^2}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}+\frac {6 b^3 (f g-e h)^2 p^2 q^2 (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^3}+\frac {3 b^2 h (f g-e h) p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}-\frac {3 b (f g-e h)^2 p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}-\frac {3 b h (f g-e h) p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.72, size = 858, normalized size = 1.74 \begin {gather*} \frac {36 b^3 e \left (3 f^2 g^2-3 e f g h+e^2 h^2\right ) p^3 q^3 \log ^3(e+f x)-18 b^2 e p^2 q^2 \log ^2(e+f x) \left (6 a \left (3 f^2 g^2-3 e f g h+e^2 h^2\right )+b \left (-18 f^2 g^2+27 e f g h-11 e^2 h^2\right ) p q+6 b \left (3 f^2 g^2-3 e f g h+e^2 h^2\right ) \log \left (c \left (d (e+f x)^p\right )^q\right )\right )+6 b e p q \log (e+f x) \left (18 a^2 \left (3 f^2 g^2-3 e f g h+e^2 h^2\right )-6 a b \left (18 f^2 g^2-27 e f g h+11 e^2 h^2\right ) p q+b^2 \left (108 f^2 g^2-189 e f g h+85 e^2 h^2\right ) p^2 q^2+6 b \left (6 a \left (3 f^2 g^2-3 e f g h+e^2 h^2\right )+b \left (-18 f^2 g^2+27 e f g h-11 e^2 h^2\right ) p q\right ) \log \left (c \left (d (e+f x)^p\right )^q\right )+18 b^2 \left (3 f^2 g^2-3 e f g h+e^2 h^2\right ) \log ^2\left (c \left (d (e+f x)^p\right )^q\right )\right )+f x \left (36 a^3 f^2 \left (3 g^2+3 g h x+h^2 x^2\right )-18 a^2 b p q \left (6 e^2 h^2-3 e f h (6 g+h x)+f^2 \left (18 g^2+9 g h x+2 h^2 x^2\right )\right )+6 a b^2 p^2 q^2 \left (66 e^2 h^2-3 e f h (54 g+5 h x)+f^2 \left (108 g^2+27 g h x+4 h^2 x^2\right )\right )-b^3 p^3 q^3 \left (510 e^2 h^2-3 e f h (378 g+19 h x)+f^2 \left (648 g^2+81 g h x+8 h^2 x^2\right )\right )+6 b \left (18 a^2 f^2 \left (3 g^2+3 g h x+h^2 x^2\right )-6 a b p q \left (6 e^2 h^2-3 e f h (6 g+h x)+f^2 \left (18 g^2+9 g h x+2 h^2 x^2\right )\right )+b^2 p^2 q^2 \left (66 e^2 h^2-3 e f h (54 g+5 h x)+f^2 \left (108 g^2+27 g h x+4 h^2 x^2\right )\right )\right ) \log \left (c \left (d (e+f x)^p\right )^q\right )+18 b^2 \left (6 a f^2 \left (3 g^2+3 g h x+h^2 x^2\right )-b p q \left (6 e^2 h^2-3 e f h (6 g+h x)+f^2 \left (18 g^2+9 g h x+2 h^2 x^2\right )\right )\right ) \log ^2\left (c \left (d (e+f x)^p\right )^q\right )+36 b^3 f^2 \left (3 g^2+3 g h x+h^2 x^2\right ) \log ^3\left (c \left (d (e+f x)^p\right )^q\right )\right )}{108 f^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(g + h*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]

[Out]

(36*b^3*e*(3*f^2*g^2 - 3*e*f*g*h + e^2*h^2)*p^3*q^3*Log[e + f*x]^3 - 18*b^2*e*p^2*q^2*Log[e + f*x]^2*(6*a*(3*f
^2*g^2 - 3*e*f*g*h + e^2*h^2) + b*(-18*f^2*g^2 + 27*e*f*g*h - 11*e^2*h^2)*p*q + 6*b*(3*f^2*g^2 - 3*e*f*g*h + e
^2*h^2)*Log[c*(d*(e + f*x)^p)^q]) + 6*b*e*p*q*Log[e + f*x]*(18*a^2*(3*f^2*g^2 - 3*e*f*g*h + e^2*h^2) - 6*a*b*(
18*f^2*g^2 - 27*e*f*g*h + 11*e^2*h^2)*p*q + b^2*(108*f^2*g^2 - 189*e*f*g*h + 85*e^2*h^2)*p^2*q^2 + 6*b*(6*a*(3
*f^2*g^2 - 3*e*f*g*h + e^2*h^2) + b*(-18*f^2*g^2 + 27*e*f*g*h - 11*e^2*h^2)*p*q)*Log[c*(d*(e + f*x)^p)^q] + 18
*b^2*(3*f^2*g^2 - 3*e*f*g*h + e^2*h^2)*Log[c*(d*(e + f*x)^p)^q]^2) + f*x*(36*a^3*f^2*(3*g^2 + 3*g*h*x + h^2*x^
2) - 18*a^2*b*p*q*(6*e^2*h^2 - 3*e*f*h*(6*g + h*x) + f^2*(18*g^2 + 9*g*h*x + 2*h^2*x^2)) + 6*a*b^2*p^2*q^2*(66
*e^2*h^2 - 3*e*f*h*(54*g + 5*h*x) + f^2*(108*g^2 + 27*g*h*x + 4*h^2*x^2)) - b^3*p^3*q^3*(510*e^2*h^2 - 3*e*f*h
*(378*g + 19*h*x) + f^2*(648*g^2 + 81*g*h*x + 8*h^2*x^2)) + 6*b*(18*a^2*f^2*(3*g^2 + 3*g*h*x + h^2*x^2) - 6*a*
b*p*q*(6*e^2*h^2 - 3*e*f*h*(6*g + h*x) + f^2*(18*g^2 + 9*g*h*x + 2*h^2*x^2)) + b^2*p^2*q^2*(66*e^2*h^2 - 3*e*f
*h*(54*g + 5*h*x) + f^2*(108*g^2 + 27*g*h*x + 4*h^2*x^2)))*Log[c*(d*(e + f*x)^p)^q] + 18*b^2*(6*a*f^2*(3*g^2 +
 3*g*h*x + h^2*x^2) - b*p*q*(6*e^2*h^2 - 3*e*f*h*(6*g + h*x) + f^2*(18*g^2 + 9*g*h*x + 2*h^2*x^2)))*Log[c*(d*(
e + f*x)^p)^q]^2 + 36*b^3*f^2*(3*g^2 + 3*g*h*x + h^2*x^2)*Log[c*(d*(e + f*x)^p)^q]^3))/(108*f^3)

________________________________________________________________________________________

Maple [F]
time = 0.23, size = 0, normalized size = 0.00 \[\int \left (h x +g \right )^{2} \left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )^{3}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3,x)

[Out]

int((h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3,x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1286 vs. \(2 (507) = 1014\).
time = 0.34, size = 1286, normalized size = 2.61 \begin {gather*} \frac {1}{3} \, b^{3} h^{2} x^{3} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{3} + a b^{2} h^{2} x^{3} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + b^{3} g h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{3} - 3 \, a^{2} b f g^{2} p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} - \frac {3}{2} \, a^{2} b f g h p q {\left (\frac {f x^{2} - 2 \, x e}{f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}}\right )} - \frac {1}{6} \, a^{2} b f h^{2} p q {\left (\frac {2 \, f^{2} x^{3} - 3 \, f x^{2} e + 6 \, x e^{2}}{f^{3}} - \frac {6 \, e^{3} \log \left (f x + e\right )}{f^{4}}\right )} + a^{2} b h^{2} x^{3} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + 3 \, a b^{2} g h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + b^{3} g^{2} x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{3} + \frac {1}{3} \, a^{3} h^{2} x^{3} + 3 \, a^{2} b g h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + 3 \, a b^{2} g^{2} x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + a^{3} g h x^{2} + 3 \, a^{2} b g^{2} x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) - 3 \, {\left (2 \, f p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {{\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} p^{2} q^{2}}{f}\right )} a b^{2} g^{2} - {\left (3 \, f p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} - {\left (\frac {{\left (e \log \left (f x + e\right )^{3} + 3 \, e \log \left (f x + e\right )^{2} - 6 \, f x + 6 \, e \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{2}} - \frac {3 \, {\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} p q \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{f^{2}}\right )} f p q\right )} b^{3} g^{2} - \frac {3}{2} \, {\left (2 \, f p q {\left (\frac {f x^{2} - 2 \, x e}{f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) - \frac {{\left (f^{2} x^{2} - 6 \, f x e + 2 \, e^{2} \log \left (f x + e\right )^{2} + 6 \, e^{2} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{2}}\right )} a b^{2} g h - \frac {1}{4} \, {\left (6 \, f p q {\left (\frac {f x^{2} - 2 \, x e}{f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + {\left (\frac {{\left (3 \, f^{2} x^{2} + 4 \, e^{2} \log \left (f x + e\right )^{3} - 42 \, f x e + 18 \, e^{2} \log \left (f x + e\right )^{2} + 42 \, e^{2} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{3}} - \frac {6 \, {\left (f^{2} x^{2} - 6 \, f x e + 2 \, e^{2} \log \left (f x + e\right )^{2} + 6 \, e^{2} \log \left (f x + e\right )\right )} p q \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{f^{3}}\right )} f p q\right )} b^{3} g h - \frac {1}{18} \, {\left (6 \, f p q {\left (\frac {2 \, f^{2} x^{3} - 3 \, f x^{2} e + 6 \, x e^{2}}{f^{3}} - \frac {6 \, e^{3} \log \left (f x + e\right )}{f^{4}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) - \frac {{\left (4 \, f^{3} x^{3} - 15 \, f^{2} x^{2} e + 66 \, f x e^{2} - 18 \, e^{3} \log \left (f x + e\right )^{2} - 66 \, e^{3} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{3}}\right )} a b^{2} h^{2} - \frac {1}{108} \, {\left (18 \, f p q {\left (\frac {2 \, f^{2} x^{3} - 3 \, f x^{2} e + 6 \, x e^{2}}{f^{3}} - \frac {6 \, e^{3} \log \left (f x + e\right )}{f^{4}}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )^{2} + f p q {\left (\frac {{\left (8 \, f^{3} x^{3} - 57 \, f^{2} x^{2} e - 36 \, e^{3} \log \left (f x + e\right )^{3} + 510 \, f x e^{2} - 198 \, e^{3} \log \left (f x + e\right )^{2} - 510 \, e^{3} \log \left (f x + e\right )\right )} p^{2} q^{2}}{f^{4}} - \frac {6 \, {\left (4 \, f^{3} x^{3} - 15 \, f^{2} x^{2} e + 66 \, f x e^{2} - 18 \, e^{3} \log \left (f x + e\right )^{2} - 66 \, e^{3} \log \left (f x + e\right )\right )} p q \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{f^{4}}\right )}\right )} b^{3} h^{2} + a^{3} g^{2} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="maxima")

[Out]

1/3*b^3*h^2*x^3*log(((f*x + e)^p*d)^q*c)^3 + a*b^2*h^2*x^3*log(((f*x + e)^p*d)^q*c)^2 + b^3*g*h*x^2*log(((f*x
+ e)^p*d)^q*c)^3 - 3*a^2*b*f*g^2*p*q*(x/f - e*log(f*x + e)/f^2) - 3/2*a^2*b*f*g*h*p*q*((f*x^2 - 2*x*e)/f^2 + 2
*e^2*log(f*x + e)/f^3) - 1/6*a^2*b*f*h^2*p*q*((2*f^2*x^3 - 3*f*x^2*e + 6*x*e^2)/f^3 - 6*e^3*log(f*x + e)/f^4)
+ a^2*b*h^2*x^3*log(((f*x + e)^p*d)^q*c) + 3*a*b^2*g*h*x^2*log(((f*x + e)^p*d)^q*c)^2 + b^3*g^2*x*log(((f*x +
e)^p*d)^q*c)^3 + 1/3*a^3*h^2*x^3 + 3*a^2*b*g*h*x^2*log(((f*x + e)^p*d)^q*c) + 3*a*b^2*g^2*x*log(((f*x + e)^p*d
)^q*c)^2 + a^3*g*h*x^2 + 3*a^2*b*g^2*x*log(((f*x + e)^p*d)^q*c) - 3*(2*f*p*q*(x/f - e*log(f*x + e)/f^2)*log(((
f*x + e)^p*d)^q*c) + (e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p^2*q^2/f)*a*b^2*g^2 - (3*f*p*q*(x/f - e*lo
g(f*x + e)/f^2)*log(((f*x + e)^p*d)^q*c)^2 - ((e*log(f*x + e)^3 + 3*e*log(f*x + e)^2 - 6*f*x + 6*e*log(f*x + e
))*p^2*q^2/f^2 - 3*(e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p*q*log(((f*x + e)^p*d)^q*c)/f^2)*f*p*q)*b^3*
g^2 - 3/2*(2*f*p*q*((f*x^2 - 2*x*e)/f^2 + 2*e^2*log(f*x + e)/f^3)*log(((f*x + e)^p*d)^q*c) - (f^2*x^2 - 6*f*x*
e + 2*e^2*log(f*x + e)^2 + 6*e^2*log(f*x + e))*p^2*q^2/f^2)*a*b^2*g*h - 1/4*(6*f*p*q*((f*x^2 - 2*x*e)/f^2 + 2*
e^2*log(f*x + e)/f^3)*log(((f*x + e)^p*d)^q*c)^2 + ((3*f^2*x^2 + 4*e^2*log(f*x + e)^3 - 42*f*x*e + 18*e^2*log(
f*x + e)^2 + 42*e^2*log(f*x + e))*p^2*q^2/f^3 - 6*(f^2*x^2 - 6*f*x*e + 2*e^2*log(f*x + e)^2 + 6*e^2*log(f*x +
e))*p*q*log(((f*x + e)^p*d)^q*c)/f^3)*f*p*q)*b^3*g*h - 1/18*(6*f*p*q*((2*f^2*x^3 - 3*f*x^2*e + 6*x*e^2)/f^3 -
6*e^3*log(f*x + e)/f^4)*log(((f*x + e)^p*d)^q*c) - (4*f^3*x^3 - 15*f^2*x^2*e + 66*f*x*e^2 - 18*e^3*log(f*x + e
)^2 - 66*e^3*log(f*x + e))*p^2*q^2/f^3)*a*b^2*h^2 - 1/108*(18*f*p*q*((2*f^2*x^3 - 3*f*x^2*e + 6*x*e^2)/f^3 - 6
*e^3*log(f*x + e)/f^4)*log(((f*x + e)^p*d)^q*c)^2 + f*p*q*((8*f^3*x^3 - 57*f^2*x^2*e - 36*e^3*log(f*x + e)^3 +
 510*f*x*e^2 - 198*e^3*log(f*x + e)^2 - 510*e^3*log(f*x + e))*p^2*q^2/f^4 - 6*(4*f^3*x^3 - 15*f^2*x^2*e + 66*f
*x*e^2 - 18*e^3*log(f*x + e)^2 - 66*e^3*log(f*x + e))*p*q*log(((f*x + e)^p*d)^q*c)/f^4))*b^3*h^2 + a^3*g^2*x

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 3392 vs. \(2 (507) = 1014\).
time = 0.48, size = 3392, normalized size = 6.89 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="fricas")

[Out]

-1/108*(4*(2*b^3*f^3*h^2*p^3*q^3 - 6*a*b^2*f^3*h^2*p^2*q^2 + 9*a^2*b*f^3*h^2*p*q - 9*a^3*f^3*h^2)*x^3 - 36*(b^
3*f^3*h^2*p^3*q^3*x^3 + 3*b^3*f^3*g*h*p^3*q^3*x^2 + 3*b^3*f^3*g^2*p^3*q^3*x + 3*b^3*f^2*g^2*p^3*q^3*e - 3*b^3*
f*g*h*p^3*q^3*e^2 + b^3*h^2*p^3*q^3*e^3)*log(f*x + e)^3 - 36*(b^3*f^3*h^2*x^3 + 3*b^3*f^3*g*h*x^2 + 3*b^3*f^3*
g^2*x)*log(c)^3 - 36*(b^3*f^3*h^2*q^3*x^3 + 3*b^3*f^3*g*h*q^3*x^2 + 3*b^3*f^3*g^2*q^3*x)*log(d)^3 + 27*(3*b^3*
f^3*g*h*p^3*q^3 - 6*a*b^2*f^3*g*h*p^2*q^2 + 6*a^2*b*f^3*g*h*p*q - 4*a^3*f^3*g*h)*x^2 + 6*(85*b^3*f*h^2*p^3*q^3
 - 66*a*b^2*f*h^2*p^2*q^2 + 18*a^2*b*f*h^2*p*q)*x*e^2 + 18*(2*(b^3*f^3*h^2*p^3*q^3 - 3*a*b^2*f^3*h^2*p^2*q^2)*
x^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q^3 - 2*a*b^2*f^2*g*h*p*q^2)*x)*e - 6*(6*b^3*f*h^2*p*q^2*x*e^2 + 2*(b^3*f^3*h^2*p*q^2 -
3*a*b^2*f^3*h^2*q)*x^3 + 9*(b^3*f^3*g*h*p*q^2 -...

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1846 vs. \(2 (481) = 962\).
time = 6.67, size = 1846, normalized size = 3.75 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**2*(a+b*ln(c*(d*(f*x+e)**p)**q))**3,x)

[Out]

Piecewise((a**3*g**2*x + a**3*g*h*x**2 + a**3*h**2*x**3/3 + a**2*b*e**3*h**2*log(c*(d*(e + f*x)**p)**q)/f**3 -
 3*a**2*b*e**2*g*h*log(c*(d*(e + f*x)**p)**q)/f**2 - a**2*b*e**2*h**2*p*q*x/f**2 + 3*a**2*b*e*g**2*log(c*(d*(e
 + f*x)**p)**q)/f + 3*a**2*b*e*g*h*p*q*x/f + a**2*b*e*h**2*p*q*x**2/(2*f) - 3*a**2*b*g**2*p*q*x + 3*a**2*b*g**
2*x*log(c*(d*(e + f*x)**p)**q) - 3*a**2*b*g*h*p*q*x**2/2 + 3*a**2*b*g*h*x**2*log(c*(d*(e + f*x)**p)**q) - a**2
*b*h**2*p*q*x**3/3 + a**2*b*h**2*x**3*log(c*(d*(e + f*x)**p)**q) - 11*a*b**2*e**3*h**2*p*q*log(c*(d*(e + f*x)*
*p)**q)/(3*f**3) + a*b**2*e**3*h**2*log(c*(d*(e + f*x)**p)**q)**2/f**3 + 9*a*b**2*e**2*g*h*p*q*log(c*(d*(e + f
*x)**p)**q)/f**2 - 3*a*b**2*e**2*g*h*log(c*(d*(e + f*x)**p)**q)**2/f**2 + 11*a*b**2*e**2*h**2*p**2*q**2*x/(3*f
**2) - 2*a*b**2*e**2*h**2*p*q*x*log(c*(d*(e + f*x)**p)**q)/f**2 - 6*a*b**2*e*g**2*p*q*log(c*(d*(e + f*x)**p)**
q)/f + 3*a*b**2*e*g**2*log(c*(d*(e + f*x)**p)**q)**2/f - 9*a*b**2*e*g*h*p**2*q**2*x/f + 6*a*b**2*e*g*h*p*q*x*l
og(c*(d*(e + f*x)**p)**q)/f - 5*a*b**2*e*h**2*p**2*q**2*x**2/(6*f) + a*b**2*e*h**2*p*q*x**2*log(c*(d*(e + f*x)
**p)**q)/f + 6*a*b**2*g**2*p**2*q**2*x - 6*a*b**2*g**2*p*q*x*log(c*(d*(e + f*x)**p)**q) + 3*a*b**2*g**2*x*log(
c*(d*(e + f*x)**p)**q)**2 + 3*a*b**2*g*h*p**2*q**2*x**2/2 - 3*a*b**2*g*h*p*q*x**2*log(c*(d*(e + f*x)**p)**q) +
 3*a*b**2*g*h*x**2*log(c*(d*(e + f*x)**p)**q)**2 + 2*a*b**2*h**2*p**2*q**2*x**3/9 - 2*a*b**2*h**2*p*q*x**3*log
(c*(d*(e + f*x)**p)**q)/3 + a*b**2*h**2*x**3*log(c*(d*(e + f*x)**p)**q)**2 + 85*b**3*e**3*h**2*p**2*q**2*log(c
*(d*(e + f*x)**p)**q)/(18*f**3) - 11*b**3*e**3*h**2*p*q*log(c*(d*(e + f*x)**p)**q)**2/(6*f**3) + b**3*e**3*h**
2*log(c*(d*(e + f*x)**p)**q)**3/(3*f**3) - 21*b**3*e**2*g*h*p**2*q**2*log(c*(d*(e + f*x)**p)**q)/(2*f**2) + 9*
b**3*e**2*g*h*p*q*log(c*(d*(e + f*x)**p)**q)**2/(2*f**2) - b**3*e**2*g*h*log(c*(d*(e + f*x)**p)**q)**3/f**2 -
85*b**3*e**2*h**2*p**3*q**3*x/(18*f**2) + 11*b**3*e**2*h**2*p**2*q**2*x*log(c*(d*(e + f*x)**p)**q)/(3*f**2) -
b**3*e**2*h**2*p*q*x*log(c*(d*(e + f*x)**p)**q)**2/f**2 + 6*b**3*e*g**2*p**2*q**2*log(c*(d*(e + f*x)**p)**q)/f
 - 3*b**3*e*g**2*p*q*log(c*(d*(e + f*x)**p)**q)**2/f + b**3*e*g**2*log(c*(d*(e + f*x)**p)**q)**3/f + 21*b**3*e
*g*h*p**3*q**3*x/(2*f) - 9*b**3*e*g*h*p**2*q**2*x*log(c*(d*(e + f*x)**p)**q)/f + 3*b**3*e*g*h*p*q*x*log(c*(d*(
e + f*x)**p)**q)**2/f + 19*b**3*e*h**2*p**3*q**3*x**2/(36*f) - 5*b**3*e*h**2*p**2*q**2*x**2*log(c*(d*(e + f*x)
**p)**q)/(6*f) + b**3*e*h**2*p*q*x**2*log(c*(d*(e + f*x)**p)**q)**2/(2*f) - 6*b**3*g**2*p**3*q**3*x + 6*b**3*g
**2*p**2*q**2*x*log(c*(d*(e + f*x)**p)**q) - 3*b**3*g**2*p*q*x*log(c*(d*(e + f*x)**p)**q)**2 + b**3*g**2*x*log
(c*(d*(e + f*x)**p)**q)**3 - 3*b**3*g*h*p**3*q**3*x**2/4 + 3*b**3*g*h*p**2*q**2*x**2*log(c*(d*(e + f*x)**p)**q
)/2 - 3*b**3*g*h*p*q*x**2*log(c*(d*(e + f*x)**p)**q)**2/2 + b**3*g*h*x**2*log(c*(d*(e + f*x)**p)**q)**3 - 2*b*
*3*h**2*p**3*q**3*x**3/27 + 2*b**3*h**2*p**2*q**2*x**3*log(c*(d*(e + f*x)**p)**q)/9 - b**3*h**2*p*q*x**3*log(c
*(d*(e + f*x)**p)**q)**2/3 + b**3*h**2*x**3*log(c*(d*(e + f*x)**p)**q)**3/3, Ne(f, 0)), ((a + b*log(c*(d*e**p)
**q))**3*(g**2*x + g*h*x**2 + h**2*x**3/3), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 5481 vs. \(2 (507) = 1014\).
time = 4.65, size = 5481, normalized size = 11.14 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="giac")

[Out]

1/108*(108*(f*x + e)*b^3*f^2*g^2*p^3*q^3*log(f*x + e)^3 + 108*(f*x + e)^2*b^3*f*g*h*p^3*q^3*log(f*x + e)^3 + 3
6*(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e)^3 - 216*(f*x + e)*b^3*f*g*h*p^3*q^3*e*log(f*x + e)^3 - 108*(f*x + e
)^2*b^3*h^2*p^3*q^3*e*log(f*x + e)^3 - 324*(f*x + e)*b^3*f^2*g^2*p^3*q^3*log(f*x + e)^2 - 162*(f*x + e)^2*b^3*
f*g*h*p^3*q^3*log(f*x + e)^2 - 36*(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e)^2 + 648*(f*x + e)*b^3*f*g*h*p^3*q^3
*e*log(f*x + e)^2 + 162*(f*x + e)^2*b^3*h^2*p^3*q^3*e*log(f*x + e)^2 + 108*(f*x + e)*b^3*h^2*p^3*q^3*e^2*log(f
*x + e)^3 + 324*(f*x + e)*b^3*f^2*g^2*p^2*q^3*log(f*x + e)^2*log(d) + 324*(f*x + e)^2*b^3*f*g*h*p^2*q^3*log(f*
x + e)^2*log(d) + 108*(f*x + e)^3*b^3*h^2*p^2*q^3*log(f*x + e)^2*log(d) - 648*(f*x + e)*b^3*f*g*h*p^2*q^3*e*lo
g(f*x + e)^2*log(d) - 324*(f*x + e)^2*b^3*h^2*p^2*q^3*e*log(f*x + e)^2*log(d) + 648*(f*x + e)*b^3*f^2*g^2*p^3*
q^3*log(f*x + e) + 162*(f*x + e)^2*b^3*f*g*h*p^3*q^3*log(f*x + e) + 24*(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e
) - 1296*(f*x + e)*b^3*f*g*h*p^3*q^3*e*log(f*x + e) - 162*(f*x + e)^2*b^3*h^2*p^3*q^3*e*log(f*x + e) - 324*(f*
x + e)*b^3*h^2*p^3*q^3*e^2*log(f*x + e)^2 + 324*(f*x + e)*b^3*f^2*g^2*p^2*q^2*log(f*x + e)^2*log(c) + 324*(f*x
 + e)^2*b^3*f*g*h*p^2*q^2*log(f*x + e)^2*log(c) + 108*(f*x + e)^3*b^3*h^2*p^2*q^2*log(f*x + e)^2*log(c) - 648*
(f*x + e)*b^3*f*g*h*p^2*q^2*e*log(f*x + e)^2*log(c) - 324*(f*x + e)^2*b^3*h^2*p^2*q^2*e*log(f*x + e)^2*log(c)
- 648*(f*x + e)*b^3*f^2*g^2*p^2*q^3*log(f*x + e)*log(d) - 324*(f*x + e)^2*b^3*f*g*h*p^2*q^3*log(f*x + e)*log(d
) - 72*(f*x + e)^3*b^3*h^2*p^2*q^3*log(f*x + e)*log(d) + 1296*(f*x + e)*b^3*f*g*h*p^2*q^3*e*log(f*x + e)*log(d
) + 324*(f*x + e)^2*b^3*h^2*p^2*q^3*e*log(f*x + e)*log(d) + 324*(f*x + e)*b^3*h^2*p^2*q^3*e^2*log(f*x + e)^2*l
og(d) + 324*(f*x + e)*b^3*f^2*g^2*p*q^3*log(f*x + e)*log(d)^2 + 324*(f*x + e)^2*b^3*f*g*h*p*q^3*log(f*x + e)*l
og(d)^2 + 108*(f*x + e)^3*b^3*h^2*p*q^3*log(f*x + e)*log(d)^2 - 648*(f*x + e)*b^3*f*g*h*p*q^3*e*log(f*x + e)*l
og(d)^2 - 324*(f*x + e)^2*b^3*h^2*p*q^3*e*log(f*x + e)*log(d)^2 - 648*(f*x + e)*b^3*f^2*g^2*p^3*q^3 - 81*(f*x
+ e)^2*b^3*f*g*h*p^3*q^3 - 8*(f*x + e)^3*b^3*h^2*p^3*q^3 + 1296*(f*x + e)*b^3*f*g*h*p^3*q^3*e + 81*(f*x + e)^2
*b^3*h^2*p^3*q^3*e + 648*(f*x + e)*b^3*h^2*p^3*q^3*e^2*log(f*x + e) + 324*(f*x + e)*a*b^2*f^2*g^2*p^2*q^2*log(
f*x + e)^2 + 324*(f*x + e)^2*a*b^2*f*g*h*p^2*q^2*log(f*x + e)^2 + 108*(f*x + e)^3*a*b^2*h^2*p^2*q^2*log(f*x +
e)^2 - 648*(f*x + e)*a*b^2*f*g*h*p^2*q^2*e*log(f*x + e)^2 - 324*(f*x + e)^2*a*b^2*h^2*p^2*q^2*e*log(f*x + e)^2
 - 648*(f*x + e)*b^3*f^2*g^2*p^2*q^2*log(f*x + e)*log(c) - 324*(f*x + e)^2*b^3*f*g*h*p^2*q^2*log(f*x + e)*log(
c) - 72*(f*x + e)^3*b^3*h^2*p^2*q^2*log(f*x + e)*log(c) + 1296*(f*x + e)*b^3*f*g*h*p^2*q^2*e*log(f*x + e)*log(
c) + 324*(f*x + e)^2*b^3*h^2*p^2*q^2*e*log(f*x + e)*log(c) + 324*(f*x + e)*b^3*h^2*p^2*q^2*e^2*log(f*x + e)^2*
log(c) + 648*(f*x + e)*b^3*f^2*g^2*p^2*q^3*log(d) + 162*(f*x + e)^2*b^3*f*g*h*p^2*q^3*log(d) + 24*(f*x + e)^3*
b^3*h^2*p^2*q^3*log(d) - 1296*(f*x + e)*b^3*f*g*h*p^2*q^3*e*log(d) - 162*(f*x + e)^2*b^3*h^2*p^2*q^3*e*log(d)
- 648*(f*x + e)*b^3*h^2*p^2*q^3*e^2*log(f*x + e)*log(d) + 648*(f*x + e)*b^3*f^2*g^2*p*q^2*log(f*x + e)*log(c)*
log(d) + 648*(f*x + e)^2*b^3*f*g*h*p*q^2*log(f*x + e)*log(c)*log(d) + 216*(f*x + e)^3*b^3*h^2*p*q^2*log(f*x +
e)*log(c)*log(d) - 1296*(f*x + e)*b^3*f*g*h*p*q^2*e*log(f*x + e)*log(c)*log(d) - 648*(f*x + e)^2*b^3*h^2*p*q^2
*e*log(f*x + e)*log(c)*log(d) - 324*(f*x + e)*b^3*f^2*g^2*p*q^3*log(d)^2 - 162*(f*x + e)^2*b^3*f*g*h*p*q^3*log
(d)^2 - 36*(f*x + e)^3*b^3*h^2*p*q^3*log(d)^2 + 648*(f*x + e)*b^3*f*g*h*p*q^3*e*log(d)^2 + 162*(f*x + e)^2*b^3
*h^2*p*q^3*e*log(d)^2 + 324*(f*x + e)*b^3*h^2*p*q^3*e^2*log(f*x + e)*log(d)^2 + 108*(f*x + e)*b^3*f^2*g^2*q^3*
log(d)^3 + 108*(f*x + e)^2*b^3*f*g*h*q^3*log(d)^3 + 36*(f*x + e)^3*b^3*h^2*q^3*log(d)^3 - 216*(f*x + e)*b^3*f*
g*h*q^3*e*log(d)^3 - 108*(f*x + e)^2*b^3*h^2*q^3*e*log(d)^3 - 648*(f*x + e)*b^3*h^2*p^3*q^3*e^2 - 648*(f*x + e
)*a*b^2*f^2*g^2*p^2*q^2*log(f*x + e) - 324*(f*x + e)^2*a*b^2*f*g*h*p^2*q^2*log(f*x + e) - 72*(f*x + e)^3*a*b^2
*h^2*p^2*q^2*log(f*x + e) + 1296*(f*x + e)*a*b^2*f*g*h*p^2*q^2*e*log(f*x + e) + 324*(f*x + e)^2*a*b^2*h^2*p^2*
q^2*e*log(f*x + e) + 324*(f*x + e)*a*b^2*h^2*p^2*q^2*e^2*log(f*x + e)^2 + 648*(f*x + e)*b^3*f^2*g^2*p^2*q^2*lo
g(c) + 162*(f*x + e)^2*b^3*f*g*h*p^2*q^2*log(c) + 24*(f*x + e)^3*b^3*h^2*p^2*q^2*log(c) - 1296*(f*x + e)*b^3*f
*g*h*p^2*q^2*e*log(c) - 162*(f*x + e)^2*b^3*h^2*p^2*q^2*e*log(c) - 648*(f*x + e)*b^3*h^2*p^2*q^2*e^2*log(f*x +
 e)*log(c) + 324*(f*x + e)*b^3*f^2*g^2*p*q*log(f*x + e)*log(c)^2 + 324*(f*x + e)^2*b^3*f*g*h*p*q*log(f*x + e)*
log(c)^2 + 108*(f*x + e)^3*b^3*h^2*p*q*log(f*x + e)*log(c)^2 - 648*(f*x + e)*b^3*f*g*h*p*q*e*log(f*x + e)*log(
c)^2 - 324*(f*x + e)^2*b^3*h^2*p*q*e*log(f*x + e)*log(c)^2 + 648*(f*x + e)*b^3*h^2*p^2*q^3*e^2*log(d) + 648*(f
*x + e)*a*b^2*f^2*g^2*p*q^2*log(f*x + e)*log(d) + 648*(f*x + e)^2*a*b^2*f*g*h*p*q^2*log(f*x + e)*log(d) + 216*
(f*x + e)^3*a*b^2*h^2*p*q^2*log(f*x + e)*log(d)...

________________________________________________________________________________________

Mupad [B]
time = 1.26, size = 1400, normalized size = 2.85 \begin {gather*} x\,\left (\frac {36\,a^3\,e\,f\,g\,h+18\,a^3\,f^2\,g^2-54\,a^2\,b\,f^2\,g^2\,p\,q+36\,a\,b^2\,e^2\,h^2\,p^2\,q^2-108\,a\,b^2\,e\,f\,g\,h\,p^2\,q^2+108\,a\,b^2\,f^2\,g^2\,p^2\,q^2-66\,b^3\,e^2\,h^2\,p^3\,q^3+162\,b^3\,e\,f\,g\,h\,p^3\,q^3-108\,b^3\,f^2\,g^2\,p^3\,q^3}{18\,f^2}-\frac {e\,\left (\frac {h\,\left (6\,a^3\,e\,h+12\,a^3\,f\,g+5\,b^3\,e\,h\,p^3\,q^3-9\,b^3\,f\,g\,p^3\,q^3-18\,a^2\,b\,f\,g\,p\,q-6\,a\,b^2\,e\,h\,p^2\,q^2+18\,a\,b^2\,f\,g\,p^2\,q^2\right )}{6\,f}-\frac {e\,h^2\,\left (9\,a^3-9\,a^2\,b\,p\,q+6\,a\,b^2\,p^2\,q^2-2\,b^3\,p^3\,q^3\right )}{9\,f}\right )}{f}\right )+{\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}^2\,\left (x^2\,\left (\frac {3\,b^2\,h\,\left (a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{2\,f}-\frac {b^2\,e\,h^2\,\left (3\,a-b\,p\,q\right )}{2\,f}\right )-x\,\left (\frac {e\,\left (\frac {3\,b^2\,h\,\left (a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {b^2\,e\,h^2\,\left (3\,a-b\,p\,q\right )}{f}\right )}{f}-\frac {3\,b^2\,g\,\left (2\,a\,e\,h+a\,f\,g-b\,f\,g\,p\,q\right )}{f}\right )+\frac {e\,\left (-11\,p\,q\,b^3\,e^2\,h^2+27\,p\,q\,b^3\,e\,f\,g\,h-18\,p\,q\,b^3\,f^2\,g^2+6\,a\,b^2\,e^2\,h^2-18\,a\,b^2\,e\,f\,g\,h+18\,a\,b^2\,f^2\,g^2\right )}{6\,f^3}+\frac {b^2\,h^2\,x^3\,\left (3\,a-b\,p\,q\right )}{3}\right )+{\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}^3\,\left (b^3\,g^2\,x+\frac {b^3\,h^2\,x^3}{3}+\frac {e\,\left (b^3\,e^2\,h^2-3\,b^3\,e\,f\,g\,h+3\,b^3\,f^2\,g^2\right )}{3\,f^3}+b^3\,g\,h\,x^2\right )+x^2\,\left (\frac {h\,\left (6\,a^3\,e\,h+12\,a^3\,f\,g+5\,b^3\,e\,h\,p^3\,q^3-9\,b^3\,f\,g\,p^3\,q^3-18\,a^2\,b\,f\,g\,p\,q-6\,a\,b^2\,e\,h\,p^2\,q^2+18\,a\,b^2\,f\,g\,p^2\,q^2\right )}{12\,f}-\frac {e\,h^2\,\left (9\,a^3-9\,a^2\,b\,p\,q+6\,a\,b^2\,p^2\,q^2-2\,b^3\,p^3\,q^3\right )}{18\,f}\right )+\frac {\ln \left (e+f\,x\right )\,\left (18\,a^2\,b\,e^3\,h^2\,p\,q-54\,a^2\,b\,e^2\,f\,g\,h\,p\,q+54\,a^2\,b\,e\,f^2\,g^2\,p\,q-66\,a\,b^2\,e^3\,h^2\,p^2\,q^2+162\,a\,b^2\,e^2\,f\,g\,h\,p^2\,q^2-108\,a\,b^2\,e\,f^2\,g^2\,p^2\,q^2+85\,b^3\,e^3\,h^2\,p^3\,q^3-189\,b^3\,e^2\,f\,g\,h\,p^3\,q^3+108\,b^3\,e\,f^2\,g^2\,p^3\,q^3\right )}{18\,f^3}+\frac {h^2\,x^3\,\left (9\,a^3-9\,a^2\,b\,p\,q+6\,a\,b^2\,p^2\,q^2-2\,b^3\,p^3\,q^3\right )}{27}+\frac {\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\,\left (x^3\,\left (f\,\left (9\,f\,g\,a^2\,b\,h+3\,e\,a\,b^2\,h^2\,p\,q-9\,f\,g\,a\,b^2\,h\,p\,q-\frac {5\,e\,b^3\,h^2\,p^2\,q^2}{2}+\frac {9\,f\,g\,b^3\,h\,p^2\,q^2}{2}\right )+\frac {b\,e\,f\,h^2\,\left (9\,a^2-6\,a\,b\,p\,q+2\,b^2\,p^2\,q^2\right )}{3}\right )+x^2\,\left (e\,\left (9\,f\,g\,a^2\,b\,h+3\,e\,a\,b^2\,h^2\,p\,q-9\,f\,g\,a\,b^2\,h\,p\,q-\frac {5\,e\,b^3\,h^2\,p^2\,q^2}{2}+\frac {9\,f\,g\,b^3\,h\,p^2\,q^2}{2}\right )+9\,a^2\,b\,f^2\,g^2+11\,b^3\,e^2\,h^2\,p^2\,q^2+18\,b^3\,f^2\,g^2\,p^2\,q^2-6\,a\,b^2\,e^2\,h^2\,p\,q-18\,a\,b^2\,f^2\,g^2\,p\,q-27\,b^3\,e\,f\,g\,h\,p^2\,q^2+18\,a\,b^2\,e\,f\,g\,h\,p\,q\right )+\frac {e\,x\,\left (9\,a^2\,b\,f^2\,g^2-6\,a\,b^2\,e^2\,h^2\,p\,q+18\,a\,b^2\,e\,f\,g\,h\,p\,q-18\,a\,b^2\,f^2\,g^2\,p\,q+11\,b^3\,e^2\,h^2\,p^2\,q^2-27\,b^3\,e\,f\,g\,h\,p^2\,q^2+18\,b^3\,f^2\,g^2\,p^2\,q^2\right )}{f}+\frac {b\,f^2\,h^2\,x^4\,\left (9\,a^2-6\,a\,b\,p\,q+2\,b^2\,p^2\,q^2\right )}{3}\right )}{3\,f\,\left (e+f\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g + h*x)^2*(a + b*log(c*(d*(e + f*x)^p)^q))^3,x)

[Out]

x*((18*a^3*f^2*g^2 - 66*b^3*e^2*h^2*p^3*q^3 - 108*b^3*f^2*g^2*p^3*q^3 + 36*a^3*e*f*g*h + 36*a*b^2*e^2*h^2*p^2*
q^2 + 108*a*b^2*f^2*g^2*p^2*q^2 - 54*a^2*b*f^2*g^2*p*q + 162*b^3*e*f*g*h*p^3*q^3 - 108*a*b^2*e*f*g*h*p^2*q^2)/
(18*f^2) - (e*((h*(6*a^3*e*h + 12*a^3*f*g + 5*b^3*e*h*p^3*q^3 - 9*b^3*f*g*p^3*q^3 - 18*a^2*b*f*g*p*q - 6*a*b^2
*e*h*p^2*q^2 + 18*a*b^2*f*g*p^2*q^2))/(6*f) - (e*h^2*(9*a^3 - 2*b^3*p^3*q^3 + 6*a*b^2*p^2*q^2 - 9*a^2*b*p*q))/
(9*f)))/f) + log(c*(d*(e + f*x)^p)^q)^2*(x^2*((3*b^2*h*(a*e*h + 2*a*f*g - b*f*g*p*q))/(2*f) - (b^2*e*h^2*(3*a
- b*p*q))/(2*f)) - x*((e*((3*b^2*h*(a*e*h + 2*a*f*g - b*f*g*p*q))/f - (b^2*e*h^2*(3*a - b*p*q))/f))/f - (3*b^2
*g*(2*a*e*h + a*f*g - b*f*g*p*q))/f) + (e*(6*a*b^2*e^2*h^2 + 18*a*b^2*f^2*g^2 - 11*b^3*e^2*h^2*p*q - 18*b^3*f^
2*g^2*p*q - 18*a*b^2*e*f*g*h + 27*b^3*e*f*g*h*p*q))/(6*f^3) + (b^2*h^2*x^3*(3*a - b*p*q))/3) + log(c*(d*(e + f
*x)^p)^q)^3*(b^3*g^2*x + (b^3*h^2*x^3)/3 + (e*(b^3*e^2*h^2 + 3*b^3*f^2*g^2 - 3*b^3*e*f*g*h))/(3*f^3) + b^3*g*h
*x^2) + x^2*((h*(6*a^3*e*h + 12*a^3*f*g + 5*b^3*e*h*p^3*q^3 - 9*b^3*f*g*p^3*q^3 - 18*a^2*b*f*g*p*q - 6*a*b^2*e
*h*p^2*q^2 + 18*a*b^2*f*g*p^2*q^2))/(12*f) - (e*h^2*(9*a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*q^2 - 6*a*b*p*q))/3))/(3*f*(e + f*x))

________________________________________________________________________________________